package org.smart4j.framework.bean;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ：Anitaxiaofeng
 * @description：返回视图对象
 * @create 2017-12-15
 **/
public class View {
    /**
     * 视图路径
     */
    private String path;

    /**
     * 模型数据（该视图所需的模型数据）
     */
    private Map<String,Object> model;

    public View(String path){
        this.path = path;
        model = new HashMap<String , Object>();
    }

    public View addModel(String key,Object value){
        model.put(key,value);
        return this;
    }

    public String getPath() {
        return path;
    }

    public Map<String, Object> getModel() {
        return model;
    }
}
